package views;
import java.awt.BorderLayout;

import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import model.DbHelper;


public class ChangeCarLocPanel extends JPanel {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private String location = "";

	/**
	 * Create the panel.
	 */
	public ChangeCarLocPanel() {
		setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		add(panel, BorderLayout.CENTER);
		DbHelper myHelper = new DbHelper();
		
		Box verticalBox = Box.createVerticalBox();
		panel.add(verticalBox);
		
		JLabel lblChoose = new JLabel("Choose Current Car Location:");
		verticalBox.add(lblChoose);
		
		JComboBox comboBox = new JComboBox(myHelper.getLocations());
		verticalBox.add(comboBox);
		
		JLabel lblChooseCar = new JLabel("Choose Car:");
		verticalBox.add(lblChooseCar);
		
		
		JComboBox comboBox_1 = new JComboBox(myHelper.getCars(location));
		verticalBox.add(comboBox_1);
		
		JLabel lblCarType = new JLabel("Car Type:");
		verticalBox.add(lblCarType);
		
		textField = new JTextField();
		verticalBox.add(textField);
		textField.setColumns(10);
		
		JLabel lblColor = new JLabel("Color:");
		verticalBox.add(lblColor);
		
		textField_1 = new JTextField();
		verticalBox.add(textField_1);
		textField_1.setColumns(10);
		
		JLabel lblSeatingCapacity = new JLabel("Seating Capacity:");
		verticalBox.add(lblSeatingCapacity);
		
		textField_2 = new JTextField();
		verticalBox.add(textField_2);
		textField_2.setColumns(10);
		
		JLabel lblTransmissionType = new JLabel("Transmission Type:");
		verticalBox.add(lblTransmissionType);
		
		textField_3 = new JTextField();
		verticalBox.add(textField_3);
		textField_3.setColumns(10);
		
		JLabel lblChooseNewLocation = new JLabel("Choose New Location:");
		verticalBox.add(lblChooseNewLocation);
		
		JComboBox comboBox2 = new JComboBox(myHelper.getLocations());
		verticalBox.add(comboBox2);
		
		JButton submitButton = new JButton("Submit Changes");
		verticalBox.add(submitButton);
		
		JLabel lblChangeCarLocation = new JLabel("Change Car Location:");
		add(lblChangeCarLocation, BorderLayout.NORTH);

	}

}
